﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CUIT.GraduationProject.ToolBoxSystem.PropertyLib
{
    public partial class PropertyLibUsersControl : UserControl
    {
        public PropertyLibUsersControl()
        {
            InitializeComponent();
        }

        private void PropertyLibUsersControl_Load(object sender, EventArgs e)
        {
            ControlProperty ctr = new ControlProperty();
            ctr.Name = "";
            ctr.Size = new Size(10, 10);
            ctr.Location = new Point(1137, 0);
            ctr.Visible = true;
            ctr.BackColor = "red";
            propertyGrid_Pro.SelectedObject = ctr;
        }

        /// <summary>
        ///  设置大小
        /// </summary>
        /// <param name="size">大小</param>
        public void SetSize(Size size)
        {
            this.Size = size;
        }

        private void timerRollUp_Tick(object sender, EventArgs e)
        {
            ////Timer newTimer = new Timer();
            ////newTimer.Interval = 200;
            ////newTimer.Tick += new EventHandler(this.newTimerTick);
            ////newTimer.Start();
            ////timerRollUp.Enabled = false;
        }

        private void newTimerTick(Object o,EventArgs e)
        {
            ////Size sz = this.Size;
            ////if (sz.Width > 26)
            ////{
            ////    sz.Width += -20;
            ////}

            ////this.Size = sz;
        }

        private void splitterHide_Paint(object sender, PaintEventArgs e)
        {
            ////int y = e.ClipRectangle.Bottom;
            ////int top = e.ClipRectangle.Top;

            ////e.Graphics.DrawLine(Pens.LightGray, new Point(0, top), new Point(0, y));
            ////e.Graphics.DrawLine(Pens.DarkGray, new Point(1, top), new Point(1, y));
            ////e.Graphics.DrawLine(Pens.Black, new Point(2, top), new Point(2, y));
            ////e.Graphics.DrawLine(Pens.Black, new Point(3, top), new Point(3, y));

        }

        private void splitterHide_MouseDown(object sender, MouseEventArgs e)
        {

        }

        private void splitterHide_MouseMove(object sender, MouseEventArgs e)
        {

        }

    }
}
